package com.xyazm.pay.controller;


import com.xyazm.common.core.JsonResult;
import com.xyazm.order.api.IOrderAfterSaleApi;
import com.xyazm.order.domain.param.PayRefundCallbackParam;
import lombok.extern.slf4j.Slf4j;
import org.apache.dubbo.config.annotation.DubboReference;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * 支付
 * @author xuyou
 * @date: 2022/7/6 14:48
 */
@RestController
@RequestMapping("/pay")
@Slf4j
public class PayController {

    @DubboReference(version = "1.0.0")
    private IOrderAfterSaleApi orderAfterSaleApi;

    /**
     * 测试取消订单支付退款回调
     */
    @PostMapping("/refundCallback")
    public JsonResult<Boolean> refundCallback(@RequestBody PayRefundCallbackParam param) {
        return orderAfterSaleApi.refundCallback(param);
    }
}
